﻿using System.Linq;
using SelfManagement.Database.POCO;
using System;

namespace SelfManagement.IServices
{
    public interface IDailyService: IBaseService<Daily>
    {
        /// <summary>
        /// 日报
        /// </summary>
        /// <param name="uid">用户id</param>
        /// <param name="dailyId">日常</param>
        /// <returns></returns>
        Daily GetUserDaily(string uid, string dailyId);

        /// <summary>
        /// 查询用户的日常任务
        /// </summary>
        /// <param name="uid"></param>
        /// <returns></returns>
        IQueryable<Daily> QueryUserDailies(string uid);

        /// <summary>
        /// 今日
        /// </summary>
        /// <param name="uid"></param>
        /// <returns></returns>
        Daily GetUserToday(string uid);

        /// <summary>
        /// 查询是否已存在某日的计划
        /// </summary>
        /// <param name="daily"></param>
        /// <returns></returns>
        bool IsExistDateOfDaily(string dailyId, string uid, DateTime date);

        /// <summary>
        /// 删除用户的日计划
        /// </summary>
        /// <param name="uid"></param>
        /// <param name="id"></param>
        /// <returns></returns>
        bool DeleteUserDailyById(string uid, string id);
    }
}
